/**
 * @author dumeng
 */
import request from '@/utils/request'
/**
 * 字典
 */
// export function getDictByCode(dictCode) {
//   return request({
//     baseURL: '/API-APP/',
//     url: '/app/sysDictionary/getDictByCode',
//     method: 'POST',
//     data: {
//       dictCode
//     }
//   })
// }
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'get',
    params: { dictCode }
  })
}
/**
 * 获取分类树形列表
 */
export function fetchList(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/getClassifyTree',
    method: 'POST',
    data
  })
}
/**
 * 分类新增
 */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/insert',
    method: 'POST',
    data
  })
}
/**
 * 分类编辑
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/update',
    method: 'POST',
    data
  })
}
/**
 * 分类状态修改
 */
export function updateStatus(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/updateStatus',
    method: 'POST',
    data
  })
}
/**
 * 分类删除
 */
export function del(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/deleteById',
    method: 'POST',
    data
  })
}
/**
 * 分类移动  上移：SY  下移：XY
 */
export function move(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysClassify/moveSort',
    method: 'POST',
    data
  })
}
